package ${entityUrl};

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Column;

/**   
 * Copyright: Copyright (c) 2019 
 * 
 * <p>说明： ${entityComment}实体类</P>
 * project ${project}
 * filename: ${entityName}
 * createTime: ${createTime}
 * version: ${version}
 * @author : ${author}
 * 
 * Modification History:
 * Date         	Author          Version          Description
 *---------------------------------------------------------------*
 * ${createTime}      ${author}    ${version}           initialize
 */
@ApiModel(value="${entityComment}实体类")
@Table(name = "${table}")
@JsonIgnoreProperties(ignoreUnknown = true)
public class ${entityName}  {

	
<#list cis as ci>
 <#if ci.javaType=="LocalDateTime" ||  ci.javaType=="LocalDate">
  <#if ci.jdbcType=="date">
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
  <#elseif ci.jdbcType=="time">
    @DateTimeFormat(pattern = "HH:mm:ss")
	@JsonFormat(pattern="HH:mm:ss",timezone = "GMT+8")
  <#elseif ci.jdbcType=="timestamp">
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
  <#else>
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
  </#if>
 </#if>
 <#if ci.property=="id">
	@TableId(value = "id", type = IdType.AUTO)
 </#if>
<#if ci.priKey=="pri">
    @Id
</#if>
    @Column(name = "${ci.column}")
	@ApiModelProperty(name = "${ci.property}" , value = "${ci.comment}")
	private ${ci.javaType} ${ci.property};

</#list>

<#list cis as ci>
    public ${ci.javaType} get${ci.property?cap_first}() {
        return ${ci.property};
    }

    public void set${ci.property?cap_first}(${ci.javaType} ${ci.property}) {
        this.${ci.property} = ${ci.property};
    }
</#list>
}
	